//
//  SuperViewController.h
//  YXLearnMasonry
//
//  Created by Rookie_YX on 16/10/27.
//  Copyright © 2016年 Rookie_YX. All rights reserved.
//

#import <UIKit/UIKit.h>
#define MAS_SHORTHAND
#define MAS_SHORTHAND_GLOBALS
// 宏必须添加在头文件前面
#import "Masonry.h"

// color
#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
#define RGBHexString(s) [UIColor colorWithHexString:s]
#define RANDOMNUM  ( (arc4random() % 256) )
#define RANDOMCOLOR  RGBCOLOR(arc4random_uniform(256),arc4random_uniform(256),arc4random_uniform(256))

//  screen
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define kScreenScale [UIScreen mainScreen].scale

// weak
#define kWeakObject(obj) __weak __typeof(obj) weakObject = obj;

#define IOS5 ([UIDevice currentDevice].systemVersion.floatValue >= 5)
#define IOS6 ([UIDevice currentDevice].systemVersion.floatValue >= 6)
#define IOS7 ([UIDevice currentDevice].systemVersion.floatValue >= 7)
#define IOS8 ([UIDevice currentDevice].systemVersion.floatValue >= 8)

#define iPhone5 ([UIScreen mainScreen].bounds.size.height == 568)
#define iPhone6 ([UIScreen mainScreen].bounds.size.width == 375)
#define iPhone6p ([UIScreen mainScreen].bounds.size.width == 414)

@interface SuperViewController : UIViewController

/**
 导航条标题
 */
- (instancetype)initWithTitle:(NSString *)title;
@end
